package com.winner.mongodb.dao;

import com.winner.mongodb.model.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Component;

/**
 * Spring操作MongoDB之Spring黑科技-采用继承MongoRepository接口实现
 */
@Component
public interface UserRepository extends MongoRepository<User,String> { // String 表示User类的泛型

    Page<User> getUserByAgeGreaterThan(int age, Pageable pageAble);
}
